<style lang="scss" type="stylesheet/scss" scoped>
</style>

<template>
  <div class="as-dropdown-item"
       :class="[{'is-hover':isHover,'is-disabled':disabled,'is-devided':devided}]"
       @click="clickItem"
       @mouseleave="isHover=false"
       @mouseenter="isHover=true">
    <slot></slot>
  </div>
</template>

<script type="text/ecmascript-6">
import emitter from "../../../mixin";
export default {
  name: "AsDropdownItem",
  mixins: [emitter],
  data() {
    return {
      isHover: false,
      size: ""
    };
  },
  props: {
    command: String,
    disabled: Boolean,
    devided: Boolean
  },
  methods: {
    clickItem() {
      if (!this.disabled) {
        this.dispatch("AsDropdown", "handCommand", this.command);
      }
    }
  }
};
</script>
